function [mu_V, L_V] = sample_movie_hyperparams(V)
[D,M]=size(V);

mu0 = zeros(D,1);
beta0 = 1;
W0 = eye(D);
nu0 = D;

V_bar = mean(V,2);
S_bar = fastCov(V);

mu0_ = (beta0*mu0+M*V_bar)/(beta0+M);
beta0_ = beta0 + M;  
nu0_ = nu0 + M;
W0_ = inv(inv(W0) + M*S_bar + ...
        ((beta0*M)/(beta0+M))*(mu0-V_bar)*(mu0-V_bar)'); 
    
L_V = wishrnd((W0_+W0_')*0.5, nu0_);  
mu_V = mu0_ + chol(inv(beta0_*L_V))'*randn(D,1);